export type PCTaskType =
    | PWR_GENERATE_OPS
    | PWR_OPERATE_SPAWN
    | PWR_OPERATE_TOWER
    | PWR_OPERATE_STORAGE
    | PWR_OPERATE_LAB
    | PWR_OPERATE_EXTENSION
    | PWR_OPERATE_OBSERVER
    | PWR_OPERATE_TERMINAL
    | PWR_DISRUPT_SPAWN
    | PWR_DISRUPT_TOWER
    | PWR_DISRUPT_SOURCE
    | PWR_SHIELD
    | PWR_REGEN_SOURCE
    | PWR_REGEN_MINERAL
    | PWR_DISRUPT_TERMINAL
    | PWR_OPERATE_POWER
    | PWR_FORTIFY
    | PWR_OPERATE_CONTROLLER
    | PWR_OPERATE_FACTORY

export interface PCTask {
    /**
     * 任务名字
     */
    name: string
    /**
     * 任务类型
     */
    type: PCTaskType
    /**
     * 目标 id
     */
    targetId: string
    /**
     * 绑定的 pc
     */
    pc: string
    /**
     * 是否已经完成
     */
    done?: boolean
    /**
     * 倒计时
     */
    timeout: number
}

export type PCStrategyFn = (room: MyRoom, task: PCTask) => void

declare global {
    interface RoomMemory {
        pc: {
            /**
             * powerCreep 任务
             */
            tasks: PCTask[]
        }
    }
}
